package com.college.facade.impl;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;

import com.college.domain.User;
import com.college.facade.UserCredentialsFacade;
import com.college.populator.impl.UserCredentialsPopulatorImpl;
import com.college.service.impl.UserCredentialsServiceImpl;

public class UserCredentialFacadeImpl implements UserCredentialsFacade {

	@Autowired
	UserCredentialsPopulatorImpl userCredentialsPopulator;
	@Autowired
	UserCredentialsServiceImpl userCredentialsService;
	
	@Override
	public boolean addUserCredentials(HttpServletRequest request,User user) {
		userCredentialsPopulator.userCredentialsPopulation(request,user);
		return userCredentialsService.addUserCredentials(user);
	}

	@Override
	public boolean deleteUserCredentials(String userName) {
		return userCredentialsService.deleteUserCredentials(userName);
	}

}
